package com.kanshu.ksgb.fastread.doudou.module.personal.activity

import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.widget.FrameLayout
import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route
import com.kanshu.ksgb.fastread.doudou.R
import com.kanshu.ksgb.fastread.doudou.app.constants.ARouterConfig
import com.kanshu.ksgb.fastread.doudou.base.baseui.BaseActivity
import com.kanshu.ksgb.fastread.doudou.module.personal.fragment.FeedbackListFragment
import com.umeng.analytics.MobclickAgent

/**
 * Title:
 * Description:
 * Copyright: Copyright(c)2018
 * Company: 看书网
 * CreateTime: 2018/4/19 15:52
 *
 * @author EvanHe
 * @version 1.0
 */
@Route(path = ARouterConfig.PERSONAL_MY_FEED_BACK)
class MyFeedbackActivity : BaseActivity() {

    companion object {
        fun actionStart(context: Context) {
            val intent = Intent(context, MyFeedbackActivity::class.java)
            context.startActivity(intent)
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setTitle(R.string.my_feed_back)
        val personCenterTv = TextView(this)
        val lp = FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT)
        personCenterTv.setText(R.string.person_center)
        personCenterTv.setTextColor(Color.parseColor("#ffffff"))
        personCenterTv.textSize = 15f
//        addRightView(personCenterTv, lp)
        mContent.setBackgroundColor(Color.parseColor("#F6F7F9"))
        showFragment(FeedbackListFragment(), "mycomment")
        personCenterTv.setOnClickListener({
            setResult(RESULT_OK)
            finish()
        })
    }

    override fun onResume() {
        super.onResume()
        MobclickAgent.onResume(this)
        MobclickAgent.onPageStart(javaClass.simpleName)
    }

    override fun onPause() {
        super.onPause()
        MobclickAgent.onPause(this)
        MobclickAgent.onPageEnd(javaClass.simpleName)
    }

}